home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
pcboard
/
pcbim20.zip
/
PCBIM20.RAR
/
PCBRUN.BAT
< prev
next >
Wrap
DOS Batch File
|
1996-06-08
|
14KB
|
442 lines
@echo off
:: ################################################################
:: ## PCBoard/InterMail/OS2/DOS Intelligent Batch File V2.0 ##
:: ## Written by Darrell Harder - Game Quest BBS SysOp ##
:: ## gremlin@express.ca - FidoNet 1:153/9117 - [604]535-1077 ##
:: ################################################################
::
:: -===[ Command Format ]==========================================-
:: PCBRUN (for node 1 operation)
:: PCBRUN [node] (for node XX operation)
:: [node] is the node number from 1 through to 99
:: eg PCBRUN 3
:: -===[ NOTES! ]=================================================-
:: If no arguments passed to PCBRUN.BAT then force TASK to 1
if %1! == ! SET TASK=1
if %1 == 0 goto MEGAERROR
if not %1! == ! SET TASK=%1
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: %% Global Environment Variables %%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: -===[ InterMail ]===============================================-
:: Change as required to your InterMail Drive and Directory
Set IMVER=229i
Set IMDRV=C:
Set IM=C:\IM
:: -===[ BG Fax ]=================================================-
:: Change as required to your BG Fax Drive and Directory
Set BGFAX=C:\IM\BGFAX
:: -===[ PCBoard ]================================================-
:: Change as required to your PCBoard Drive and Directory
Set PCBVER=15.22
Set PCBDRIVE=C:
Set PCBDIR=\PCB\NODE%TASK%
:: -===[ DSZ ]====================================================-
Set CEXYZLOG=%PCBDRIVE%%PCBDIR%\CEXYZ.%TASK%
Set DSZLOG=%PCBDRIVE%%PCBDIR%\PCBDSZ.%TASK%
:: -===[ NOTES! ]=================================================-
:: If you have your PCB com ports on different nodes than the ones
:: used here, be sure to make changes!
::
:: If you don't have a local node and want to change them to actual
:: PCBoard Nodes then the following changes WILL BE REQUIRED
::
:: Warning! ─> DO NOT CHANGE TASK "0"!
if %TASK% == 0 goto localbbs
:: Check label (localbbs) to see if changes are required
:: Add Rem (::) to change from local BBS to Sysem Node
if %TASK% == 1 goto localbbs
:: Add and/or Change Ports as required per your BBS settings.
:: [NODE] [NODE] [PORT]
:: Remove Rem (::) to change from local BBS to System Node
if %TASK% == 1 Set PORT=1
if %TASK% == 2 Set PORT=2
if %TASK% == 3 Set PORT=4
if %TASK% == 4 Set PORT=5
if %TASK% == 5 Set PORT=6
if %TASK% == 6 Set PORT=3
if %TASK% == 7 Set PORT=7
if %TASK% == 8 Set PORT=8
:: -===[ SIO & SU ]===============================================-
:: Change as required to your SU.EXE Drive and Directory
Set SU=C:\U2\SIO
:: -===[ NOTES! ]=================================================-
:: Remove Rem (::) to lock certain nodes at a lower speed.
:: (Great for calling overseas so you don't lose carrier)
:: Change LOCKBAUD=xxxxx as required for global locked baud rates.
Set LOCKBAUD=57600
:: [NODE] [NODE] [SIO Util] [PORT] [Locked BAUD Rates]
if %TASK% == 1 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 2 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 3 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 4 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
:: if %TASK% == 4 %SU%\SU.EXE %PORT% LOCK 19200
if %TASK% == 5 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 6 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 7 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
if %TASK% == 8 %SU%\SU.EXE %PORT% LOCK %LOCKBAUD%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: %% InterMail Start Up %%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: -===[ Display to SysOp for information ]=======================-
echo.
echo.
echo [≡≡≡]╠:::::::::: Starting PC Board v%PCBVER% & InterMail v%IMVER%
echo On Node: %TASK% Port: %PORT%
echo.
echo.
wait! 1 s
:: -===[ InterMail Looping Label ]================================-
:startim
%IMDRV%
cd %IM%
IM /#%TASK% /nf /os2to:4 /rdbg
:: -===[ Checking InterMail exit codes ]==========================-
:: These you will have to define in the InterMail Setup program
if errorlevel 255 goto fax_in
if errorlevel 212 goto 38400
if errorlevel 211 goto 33600
if errorlevel 210 goto 31200
if errorlevel 209 goto 28800
if errorlevel 208 goto 26400
if errorlevel 207 goto 24000
if errorlevel 206 goto 21600
if errorlevel 205 goto 19200
if errorlevel 204 goto 16800
if errorlevel 203 goto 14400
if errorlevel 202 goto 12000
if errorlevel 201 goto 9600
if errorlevel 200 goto 7200
if errorlevel 199 goto 4800
if errorlevel 198 goto 2400
if errorlevel 197 goto 1275
if errorlevel 196 goto 1200
if errorlevel 195 goto 300
:: if errorlevel 191 goto scanecho
:: if errorlevel 190 goto unpackmail
if errorlevel 100 goto mail_in
if errorlevel 50 goto localbbs
if errorlevel 49 goto wait_till
if errorlevel 34 goto weeklyevent
if errorlevel 33 goto dailyevent
if errorlevel 25 goto startim
if errorlevel 10 goto finish
if errorlevel 8 goto internal
if errorlevel 6 goto fossil
if errorlevel 5 goto modeminit
if errorlevel 4 goto modemresp
if errorlevel 3 goto fulldisk
if errorlevel 2 goto external
if errorlevel 1 goto internal
goto startim
:: -===[ Connect Speed Labels ]===================================-
:: Used to pass the connect speeds to PCBoard
:38400
Set CON=38400
goto caller
:33600
Set CON=33600
goto caller
:31200
Set CON=31200
goto caller
:28800
Set CON=28800
goto caller
:26400
Set CON=26400
goto caller
:24000
Set CON=24000
goto caller
:21600
Set CON=21600
goto caller
:19200
Set CON=19200
goto caller
:16800
Set CON=16800
goto caller
:14400
Set CON=14400
goto caller
:12000
Set CON=12000
goto caller
:9600
Set CON=9600
goto caller
:7200
Set CON=7200
goto caller
:4800
Set CON=4800
goto caller
:2400
Set CON=2400
goto caller
:1275
Set CON=1275
goto caller
:1200
Set CON=1200
goto caller
:300
Set CON=300
goto caller
:: -===[ BGFax Label for Faxs ]===================================-
:fax_in
cd %BGFAX%
CALL bg_fax.bat
goto startim
:: -===[ BBS Caller Label ]========================================-
:caller
Set PCBDAT=C:\PCB\PCBOARD.DAT
Set NODE=%TASK%
Set PCB=/C:%CON% /PORT%PORT%: /OS /NODE:%TASK% /NOFIDO /BAUD:%LOCKBAUD%
:: This is a bit tricky. You can run this batch file with no DOBBS.BAT
:: and without a EXECBBS.BAT, however, you must be aware that there are
:: is something that you will not get, and that is the correct connect
:: information. All of this is not required for 99% of most BBS. But on
:: mine it is because I run a DOOM server and I need to know exactly
:: what the carrier information is. If you wish to try this without
:: that info and use PCBRUN.BAT as a single, yes, single batch to run
:: all of your nodes, then just Rem (::) out the next line and try it.
:: Like I said, if I did not need the other information passed to PCB
:: I would be using PCBRUN.BAT as the only batch file. <G> Enjoy!
:: You can pass some info via the connecting information (/Arq/None)
:: but that involves changing a few other things and I will not get into
:: it unless some one sends me a message about wanting it that way.
:: -===[ Rem (::) this line to run as a single intelligent batch. ]======-
DOBBS.BAT
:: -===[ NOTES! ]========================================================-
:: Echo Information to screen for Sysop to make sure settings are correct
echo Connect %1
echo Port: %2
echo Minutes %3
echo Modem connection %4
echo Node: %5
wait! 1 s
:: -===[ Connect Carrier String ]========================================-
:: Used to pass the connect carrier speed and string to PCBoard
SET CONNECT=/CSTR:%4 %PCB%
SET PCB=%CONNECT%
:: -===[ NOTES! ]========================================================-
:: Clean up used Environment Variables to save Environment space
SET CON=
SET CONNECT=
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: %% PCBoard Starting Loop %%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:startpcb
%PCBDRIVE%
cd %PCBDIR%
if exist remote.bat REN remote.bat remote.sys
if exist event.bat DEL event.bat
if exist door.bat DEL door.bat
if exist endpcb DEL endpcb
pcboardm %PCB%
:: %ERROR /cstr:%CSTRING% /EVENT:%EVENTIME%
if exist remote.bat CALL remote.bat
if exist door.bat CALL door.bat
if exist event.bat CALL event.bat
if exist endpcb GOTO after_pcb
if NOT exist endpcb GOTO startpcb
goto after_pcb
:: -===[ After PCBoard Caller Label ]=============================-
:after_pcb
:: Clean up Node Directory
if exist %PCBDIR%\*.BAK echo Y | del %PCBDIR%\*.BAK
if exist %PCBDIR%\*.LOG echo Y | del %PCBDIR%\*.LOG
if exist %PCBDIR%\*.TMP echo Y | del %PCBDIR%\*.TMP
if exist %PCBDIR%\*.TXT echo Y | del %PCBDIR%\*.TXT
if exist %PCBDIR%\WORK\*.* echo Y | del %PCBDIR%\WORK\*.*
if exist %PCBDIR%\*.%PCBNODE% echo Y | del %PCBDIR%\*.%PCBNODE%
:: -===[ Other things you need to do when the user logs off. ]====-
:: intrecho /scan
if errorlevel 99 goto setuperror
if errorlevel 10 goto startpcb
if errorlevel 8 goto startpcb
if errorlevel 4 goto modeminit
goto startim
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: %% InterMail Maintenance Labels for Exit Levels %%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: -===[ Local Logon Label for Sysop ]============================-
:localbbs
%PCBDRIVE%
cd %PCBDIR%
pcboardm /localon
goto after_pcb
:: -===[ Mail Call label ]========================================-
:mail_in
%IMDRV%
cd %IM%
echo ath1 > com%PORT%
echo InterEcho Processing Inbound Mail
:: intrecho
:: CALL c:\im\compile.bat
goto startim
:: -===[ Weekly Events Label ]====================================-
:weeklyevent
%IMDRV%
cd %IM%
:: intrecho /notify
goto startim
:: -===[ Daily Events Label ]=====================================-
:dailyevent
%IMDRV%
cd %IM%
cls
echo.
echo.
echo Daily Maintenance Being performed
:: Put all you dailt maint here. I use CALL to my batches a lot
:: because I can track problems down quicker
:: CALL e:\fdfiles\ezy-mail.bat
:: CALL c:\im\compile.bat
:: CALL c:\bbs\mailin.bat
:: CALL c:\allfix\all_fix.bat
%PCBDRIVE%
cd %PCBDIR%
:: ------ PCboard daily message maint -----------------------------------
pcbpack /area:0;1;2-31 /cap:c:\pcb\L-PACK.RPT /days:90 /killbak /killdups /crc:50 /maxmsgs:200 /report:c:\pcb\L-BUL.RPT
pcbpack /area:100-200 /fast /cap:c:\pcb\F-PACK.RPT /days:60 /killbak /killdups /crc:50 /maxmsgs:400 /report:c:\pcb\F-BUL.RPT
intrecho
pcbpack /area:all /index
:: =====[ These are nothing more than examples and tests ]=========-
:: ----- Batch file to save BRE Game.dat file ---------------------------
:: CALL c:\bbs\ezybats\brechek.bat
:: CALL bresave.bat
:: pcbpack /area:0-31 /cap:c:\pcb\BULS.RPT /days:90 /killbak /killdups /crc:50 /maxmsgs:200 /report:c:\pcb\PCBPACK.RPT
:: fidopcb toss
:: pcbnet /area:all
:: pcbpack /area:all /report:buls\blt13 /upcase
:: pcbfiler /sort
:: :pack
:: pcbpack /area:0-1 /days:60 /maxmsgs:500
:: pcbpack /area:7 /days:12 /killbak /maxmsgs:20
:: pcbpack /area:30-34 /cap:i:\logs\pack.log /crc:50 /killbak /killdups /maxmsgs:600
:: pcbpack /area:35-36 /cap:i:\logs\pack.log /crc:50 /killbak /killdups /maxmsgs:400
:: pcbpack /area:37 /killbak /maxmsgs:200
:: pcbpack /area:38-59 /maxmsgs:500 /killbak /killdups /crc:50
:: pcbpack /area:60 /killbak /maxmsgs:200
:: pcbpack /area:100-129 /killbak /maxmsgs:500
wait! 1 m
goto startim
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: %% InterMail Labels for Internal/External Error Exit Levels %%
:: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:: -===[ Set Up Error Label ]=====================================-
:setuperror
echo Setup Error!
goto startim
:: -===[ Run Time Error Label ]===================================-
:runtimeerror
echo Runtime Error! Consult Errors.Log
goto startim
:: -===[ Fossil Error Label ]=====================================-
:fossil
Echo Wrong Fossil Version!
goto finish
:: -===[ this is tricky ]=========================================-
:wait_till
echo ath1 > com%PORT%
wait! 5 s
goto startim
:: -===[ Modem Init Error Label ]=================================-
:modeminit
cls
Echo.
Echo InterMail Unable To Initialize Modem!
Echo.
Echo Now trying to re-init Pcboard/InterMail Node %TASK%
wait! 2 s
echo ATHZ > com%PORT%
wait! 2 s
echo ATH1 > com%PORT%
goto startim
:: -===[ Modem Not Responding Error ]=============================-
:modemresp
Echo InterMail Modem NOT Responding!
goto finish
:: -===[ Disk Full Error Label ]==================================-
:fulldisk
Echo Insufficent Disk Space To Proceed!
goto finish
:: -===[ External File Error Label ]==============================-
:external
Echo External InterMail Error - System File Missing!
goto finish
:: -===[ Internal File Error Label ]=============================-
:internal
Echo Internal InterMail Error!
goto finish
:: -===[ We are finished ]========================================-
:finish
echo.
echo Terminating PC Board/InterMail v%IMVER% on Node: %TASK% Port: %PORT%
echo.
:: -===[ NOTE! ]==================================================-
:: This statment needed because I have MOUSE on COM1
if %TASK% == 1 goto end
echo ath1 > com%PORT%
echo.
echo.
goto end
:: -===[ NOTE! ]==================================================-
:megaerror
:: -===[ Back to InterMail Directory ]============================-
:end
%IMDRV%
CD %IM%